<!doctype html>
<html>
<head>
    <include file="Public/head"/>

    <link href="__CSS__/main.css" rel="stylesheet" type="text/css" />
    <link href="__CSS__/index.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__JS__/jquery-2.1.0.min.js"></script>
    <script type="text/javascript" src="__JS__/jquery.spinner.js"></script>
    <link rel="stylesheet" href="__CSS__/jquery.spinner.css" />

    <style>
        .price {
            width: auto;
            padding: 0;
            margin-top: 0;
            border-top: 0;
            padding-top: 0;
            color: #ec5151;
            font-size: 1rem;
            display: inline-block;
            font-weight: bold;
        }
    </style>
</head>

<body style="background:#eee;">
<header id="header">
    <div class="header_l"> <a class="ico_10" href="{:U('Cart/index')}"> 返回 </a> </div>
    <h1 style="line-height: 50px;">编辑购物车</h1>
    <div class="header_r"><a class="edit" href="{:U('Cart/index')}" style="text-indent:0;line-height: 50px;font-size: 16px;">返回</a></div>
</header>
<!--<div class="top-head">-->
    <!--<a class="edit" href="{:U('Cart/index')}">完成</a>-->
<!--</div>-->
<form id="form" action="{:U('Cart/delete')}" method="post" style="margin-bottom: 116px;">
<div class="cart-content">


        <volist name="carts" id="cart">
            <div class="cart-good">
                <div class="cart-radio">
                    <div class="cbt cb cb_active">
                        <input type="checkbox" hidden="hidden" name="cart_id[]" value="{$cart.id}" checked="checked">
                    </div>
                </div>
                <img src="http://{:C('DOMAIN')}{:get_item_imgs($cart['goods']['multimage'],1,'path')['path']}">
                <div class="good-data cart-width">
                    <p>{$cart.goods_title}</p>
                    {:hook("order_attribute",$cart['attribute'])}
                    <p class="color-good">￥<span class="price" data-id="{$cart.id}" data-number="{$cart.number}">{$cart.goods.price}</span>
                        <!--<span class="fr">X{$cart.number}</span>-->
                        <di class="spinner">
                            <button class="decrease" type="button" data-id="{$cart.id}" data-activity="{$cart.activity}">-</button>
                            <input type="text" class="spinnerExample value passive" class="fr" name="number" maxlength="2" value="{$cart.number}">
                            <button class="increase" type="button" data-id="{$cart.id}" data-activity="{$cart.activity}">+</button>
                        </di>
                    </p>
                </div>
            </div>
        </volist>


</div>

    <footer class="toolbar" style="box-sizing: border-box;padding-left: 3%;height: 45px;line-height: 45px;">
        <div class="cbt all cb cb_active" name="checkAll" type="checkbox"></div>全选
        合计: <em class="price" id="goods_subtotal">￥<span class="color-red size total" >{$total}</span></em>
        <a class="settlement" href="javascript:void(0);">删除</a>
        <script>
            $(function(){
                $(".settlement").on('click',function(){
                    $("#form").submit();
                });
            });
        </script>
    </footer>

    <include file="script"/>


</form>
</body>
</html>
